import time


def deco(func):
    def wrapper(*args, **kwargs):
        startTime = time.time()
        func(*args, **kwargs)
        endTime = time.time()
        msecs = (endTime - startTime) * 1000
        print(f"time is {msecs} ms")

    return wrapper


@deco
def func(a, b):
    print("result is %d" % (a + b))
    time.sleep(1)


if __name__ == '__main__':
    func(3, 4)
